STEP 11: Let's use a random x-coordinate to set the position of the falling meteor!

  • Find this line inside the interval event: ····my_var·=·random.randint(1,10)¬
  • Change the name of the random integer variable from my_var to x.
  • Change the range of the random integer to (-240, 240).
  • Change the meteor sprite's x-coordinate argument to x.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)